<%@ taglib prefix="page" uri="http://com.qipay/pagelib" %>
<%@ page language="java" contentType="text/html;charset=utf-8" %>
<!doctype html>
<html>
<head>
    <jsp:include page="head.jsp"></jsp:include>
    <title>批量上传通道二维码</title>
    <link rel="stylesheet" href="<%= request.getAttribute("StaticHost") %>/css/dataTables.bootstrap.min.css">

</head>
<body class="devpreview hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <jsp:include page="nav.jsp"></jsp:include>
    <jsp:include page="left.jsp"></jsp:include>
    <div class="content-wrapper">
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box border">
                        <div class="form-group"><label >通道ID
                            (<span style="color: red">!点击"开始解析"之前，必须先上传二维码</span>)</label>
                            <input type="text" class="form-control" type="number"  value=""
                                   placeholder="&nbsp;请填写通道ID">
                        </div>
                        <div class="box-footer">
                            <button type="button" class="btn btn-primary btn-sm borderNone"
                                    onclick="window.history.back()">返回</button>
                            <button type="submiton" onclick="jiexi();" class="btn btn-success btn-sm borderNone">开始解析</button>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <%--<jsp:include page="foot.jsp"></jsp:include>--%>
</div>
<script src="<%= request.getAttribute("StaticHost") %>/js/adminlte.min.js"></script>
<script type="text/javascript">
    // $('#submiton').click();

    function jiexi() {
        var pk = $('input').val();
        if(pk!=""&&pk*1>0){
            $.ajax({
                url: "${pageContext.request.contextPath}/spUser/personCode/add?spId=" + pk,
                type: "POST",
                async: true,//true异步 false同步
                context: this,
                timeout: 10000,
                success: function (data) {
                    if (data != null && data.code == 200) {
                        alert(data.message);
                    }else {
                        alert("fail:" + data);
                    }
                },
                error: function (d, s, b) {
                    alert("失败:" + b);
                }
            });
        }else {
            alert("请正确填写通道号")
        }

    }
</script>
</body>
</html>

